//
//  GoalMainViewController
//
//  Created by yhj on 2017/2/20.
//  Copyright © 2017年 cdnunion. All rights reserved.
//  目标主界面

#import "GoalMainViewController.h"
#import "LeaveMainViewController.h"

#import "TodayMainViewController.h"
#import "WeekMainViewController.h"
#import "MonthMainViewController.h"
#import "YearMainViewController.h"


@interface GoalMainViewController ()

@end

@implementation GoalMainViewController

- (void)viewDidLoad {
    [super viewDidLoad];

     self.title=@"目标";

    self.view.backgroundColor=WhiteColor;

     [self.view makeToast:@"暂无" duration:.5 position:CSToastPositionCenter];

    // 初始化样式
//    [self initView];

    // 添加子控制器
//    [self addChildVC];

}

// 初始化样式
-(void)initView
{
    // 设置标题栏样式
    [self setUpTitleEffect:^(UIColor *__autoreleasing *titleScrollViewColor, UIColor *__autoreleasing *norColor, UIColor *__autoreleasing *selColor, UIFont *__autoreleasing *titleFont, CGFloat *titleHeight, CGFloat *titleWidth)
     {
         *titleScrollViewColor=[UIColor whiteColor];
         *norColor=BlackColor;
         *selColor=HexRGB(0x1E90FF);
         *titleWidth=APPW/4;
     }];

    // 设置下标
    [self setUpUnderLineEffect:^(BOOL *isUnderLineDelayScroll, CGFloat *underLineH, UIColor *__autoreleasing *underLineColor, BOOL *isUnderLineEqualTitleWidth) {
        *isUnderLineDelayScroll=YES;
        *underLineColor=HexRGB(0x1E90FF);
    }];
}

// 添加子控制器
-(void)addChildVC
{
    // 今日
    TodayMainViewController *todayMainViewController=[TodayMainViewController new];
    todayMainViewController.title=@"今日";
    [self addChildViewController:todayMainViewController];

    // 本周
    WeekMainViewController *weekMainViewController=[WeekMainViewController new];
    weekMainViewController.title=@"本周";
    [self addChildViewController:weekMainViewController];

    // 本月
    MonthMainViewController *monthMainViewController=[MonthMainViewController new];
    monthMainViewController.title=@"本月";
    [self addChildViewController:monthMainViewController];

    // 本年
    YearMainViewController *yearMainViewController=[YearMainViewController new];
    yearMainViewController.title=@"本年";
    [self addChildViewController:yearMainViewController];
    
}

@end
